<%@ page import="com.tucue.model.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="utf-8">
<title>招商政策管理</title>
<link rel="stylesheet" type="text/css" href="<%request.getContextPath();%>/css/jquery.dataTables.css"/>
<link type="text/css" href="<%request.getContextPath();%>/css/bootstrap.min.css" rel="stylesheet"/>
<link type="text/css" href="<%request.getContextPath();%>/css/commonStyle.css" rel="stylesheet"/>
<link type="text/css" href="<%request.getContextPath();%>/css/Login.css" rel="stylesheet">
<style type="text/css" class="init"></style>
<script type="text/javascript" language="javascript" src="<%request.getContextPath();%>/js/jquery.js"></script>
<script type="text/javascript" src="<%request.getContextPath();%>/js/jquery.dataTables.js"></script>
  <!--  Text Editor begin  -->
  <script charset="utf-8" src="<%request.getContextPath();%>/js/kindeditor/kindeditor-min.js"></script>
  <script charset="utf-8"  src="<%request.getContextPath();%>/js/kindeditor/lang/zh_CN.js"></script>
  <script>
    var editor;
    KindEditor.ready(
            function(K)
            {
              editor = K.create('textarea[name="content"]',
                      {
                        allowFileManager : true ,
                        resizeType:0
                      }
              );

            }
    );
  </script>
  <!--  Text Editor end  -->
</head>

<body>
<div class="container">
  <div class="row show-grid">
    <h3 style="text-align: center;font-weight: 700;">招商政策新建/编辑</h3>
  </div>
  <div class="row show-grid unified-border">
    <div class="form-group" id="contact_text">
      <form action="/${addOrUpdate}/merchantsPolicy" method="post">
        <input name="parkid" value="${merchantsPolicy.parkid}" type="hidden"/>
        <textarea name="content" style=" display:block;width:900px;height:450px; margin-left:auto; margin-right:auto;">${merchantsPolicy.content}</textarea>
        <div class="buttongroup" style="width:970px; margin-left:0px; margin-top:0px;">
          <button type="button" class="btn btn-primary" id="contact_btn1" style="margin-left:100px;">保存为草稿</button>
          <button type="button" class="btn btn-primary" id="contact_btn2">保存并上线</button>
        </div>
        <!-- 保存为草稿的弹窗 开始 -->
        <div id="Popups_savech" class="Popup_out_st">
          <div id="Con_box_savech" class="Popup_in_st">
            <img src="../images/close.png" id="closePopups_savech" class="Close_Popups"/>
            <label class="Popup_label">保存为草稿</label>
            <hr class="Popup_in_hr"/>
            <p class="Popup_in_p">保存修改内容？</p>
            <button type="submit" class="btn btn-primary" id="Popups_saveyes" style="width: 60px;margin-left: 80px;margin-top: 8px;float: left;">是</button>
            <button class="btn btn-primary" id="Popups_saveno" style="margin-left: 50px;margin-top: 8px;width: 60px;float: left;">否</button>
          </div>
        </div>
        <!-- 保存为草稿弹窗 结束 -->
        <!-- 保存并上线弹窗 开始 -->
        <div id="Popups_saveup" class="Popup_out_st">
          <div id="Con_box_saveup" class="Popup_in_st">
            <img src="../images/close.png" id="closePopups_saveup" class="Close_Popups"/>
            <label class="Popup_label">保存并上线</label>
            <hr class="Popup_in_hr"/>
            <p class="Popup_in_p">保存修改内容并发布上线？</p>
            <button type="submit" class="btn btn-primary" id="Popups_saveupyse" style="width: 60px;margin-left: 80px;margin-top: 8px;float: left;">是</button>
            <button class="btn btn-primary" id="Popups_saveupno" style="margin-left: 50px;margin-top: 8px;width: 60px;float: left;">否</button>
          </div>
        </div>
        <!-- 保存并上线弹窗 结束 -->
      </form>
    </div>

  </div>
</div>

<script type="text/javascript">
  wdh=$(window).width();
  left=(wdh-330)/2;
  www=$(document).width();
  hhh=$(document).height();
  $(document).ready(function(){
    //保存为草稿
    $("#contact_btn1").click(function(){
      $("#Popups_savech").fadeIn("slow");
      $("#page_index").css('overflow','scroll');
      $("#page_index").css('overflow','hidden');
      $("#Con_box_savech").css('margin-left',left);
      $("#Con_box_savech").css('margin-top','270px');
    });
    $("#closePopups_savech").click(function(){
      $("#Popups_savech").fadeOut("slow");
      $("#page_index").css('overflow-y','auto');
    });

    $("#Popups_saveyes").click(function(){
      $("#Popups_savech").fadeOut("slow");
      $("#page_index").css('overflow-y','auto');
    });

    $("#Popups_saveno").click(function(){
      $("#Popups_savech").fadeOut("slow");
      $("#page_index").css('overflow-y','auto');
    });

    //保存并上线
    $("#contact_btn2").click(function(){
      $("#Popups_saveup").fadeIn("slow");
      $("#page_index").css('overflow','scroll');
      $("#page_index").css('overflow','hidden');
      $("#Con_box_saveup").css('margin-left',left);
      $("#Con_box_saveup").css('margin-top','270px');
    });
    $("#closePopups_saveup").click(function(){
      $("#Popups_saveup").fadeOut("slow");
      $("#page_index").css('overflow-y','auto');
    });

    $("#Popups_saveupyse").click(function(){
      $("#Popups_saveup").fadeOut("slow");
      $("#page_index").css('overflow-y','auto');
    });

    $("#Popups_saveupno").click(function(){
      $("#Popups_saveup").fadeOut("slow");
      $("#page_index").css('overflow-y','auto');
    });

    $("#page_index ").css('width',www);
  });
  $(window).resize(function(){
    wdh=$(window).width();
    left=(wdh-330)/2;
    www=$(document).width();
    //保存为草稿
    $("#Con_box_savech").css('margin-left',left);
    $("#Con_box_savech").css('margin-top','270px');
    //保存并上线
    $("#Con_box_saveup").css('margin-left',left);
    $("#Con_box_saveup").css('margin-top','270px');

    $("#page_index ").css('width',www);
  });
</script>
</body>
</html>
